const express = require("express");
const app = express();
const path = require("path");
const bodyParser = require('body-parser');
const cookieParser = require('cookie-parser');

//设置路径
app.use(express.static(path.join(__dirname, "src")));
app.use(express.static(path.join(__dirname, "../")));
//将参数转换成对象
app.use(bodyParser.urlencoded({ extended: true }));
//req.cookie[xxx] 获取cookie
app.use(cookieParser()); 

app.listen(4000, function(req, res) {
  console.log('打开http://localhost:4000/fish.html开启你的邪恶之路')
}) 